package com.miyake.dsp.osa.lab.wrapper;

import com.miyake.dsp.osa.lab.Calculator;
import com.miyake.dsp.osa.lab.FileSetting;
import com.miyake.dsp.osa.lab.LabUiAnnotation;
import com.miyake.dsp.otdr.Sr4731Parser;
@LabUiAnnotation(caption="SR4731 Reader")
public class Sr4731Wrapper extends Calculator {
	public static final String OUTPUT = "Loss";
	private FileSetting setting;
	
	public Sr4731Wrapper(FileSetting setting) {
		initOutput(OUTPUT);
		this.setting = setting;
	}
	
	@Override
	public void process() {
		Sr4731Parser parser = new Sr4731Parser(setting.getFilePath());
		setOutput(OUTPUT, parser.getTraceDouble());
	}

	@Override
	public Object getSetting() {
		return this.setting;
	}

}
